import reshandler from 'services/response-handler'
/*
 * 收藏列表
 */
function makeData(response) {
  return Object.assign({},response, {
    favorites: response.favorites || []
  })
}

export default function (params, success, fail) {
  // request 
  params = Object.assign({}, params, {
    methodName: "ListFavorite",
  })

  // invoke
  this.$.get(params)
    .then(reshandler.success(success, fail, makeData), reshandler.error(fail))
}
